import { stream } from '@/utils/request'
import { ltrim } from '@/utils'

export default class Download {
  constructor(path) {
    this.baseUrl = '/' + ltrim(path, '/')
  }

  // 下载数据
  download(data) {
    return stream(this.baseUrl, data)
  }
}
